﻿/// <reference path="../Common/jquery-1.3.2.js" />

Type.registerNamespace("jQueryNET.Controls");

jQueryNET.Controls.Label = function jQueryNET$Controls$Label(element, createSelf) {
	jQueryNET.Controls.Label.initializeBase(this, [element]);
}

jQueryNET.Controls.Label.createElement = function(parent) {
	var element =
		$(parent)
			.append('<span class="label"></span>')
			.find('span.label:last');

	return element.get(0);
}

function jQueryNET$Controls$Label$initialize() {
	jQueryNET.Controls.Label.callBaseMethod(this, "initialize");
}

function jQueryNET$Controls$Label$dispose() {
	jQueryNET.Controls.Label.callBaseMethod(this, "dispose");
}


function jQueryNET$Controls$Label$get_text() {
	if (arguments.length !== 0) throw Error.parameterCount();
	return $(this.get_element()).text();
}

function jQueryNET$Controls$Label$set_text(value) {
	var e = Function._validateParams(arguments, [{ name: "value", type: String, mayBeNull: false}]);
	if (e) throw e;
	
	$(this.get_element()).text(value);
}

jQueryNET.Controls.Label.prototype = {
	initialize: jQueryNET$Controls$Label$initialize,
	dispose: jQueryNET$Controls$Label$dispose,

	get_text: jQueryNET$Controls$Label$get_text,
	set_text: jQueryNET$Controls$Label$set_text
}

jQueryNET.Controls.Label.registerClass("jQueryNET.Controls.Label", jQueryNET.Controls.ControlBase);